package capacity

import (
	"github.com/flipped-aurora/gin-vue-admin/server/api/v1"
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type CapacityRouter struct {
}

// InitCapacityRouter 初始化 capacity表 路由信息
func (s *CapacityRouter) InitCapacityRouter(Router *gin.RouterGroup) {
	capacitysRouter := Router.Group("capacitys").Use(middleware.OperationRecord())
	capacitysRouterWithoutRecord := Router.Group("capacitys")
	var capacitysApi = v1.ApiGroupApp.CapacityApiGroup.CapacityApi
	{
		capacitysRouter.POST("createCapacity", capacitysApi.CreateCapacity)             // 新建capacity表
		capacitysRouter.DELETE("deleteCapacity", capacitysApi.DeleteCapacity)           // 删除capacity表
		capacitysRouter.DELETE("deleteCapacityByIds", capacitysApi.DeleteCapacityByIds) // 批量删除capacity表
		capacitysRouter.PUT("updateCapacity", capacitysApi.UpdateCapacity)              // 更新capacity表
	}
	{
		capacitysRouterWithoutRecord.GET("findCapacity", capacitysApi.FindCapacity)       // 根据ID获取capacity表
		capacitysRouterWithoutRecord.GET("getCapacityList", capacitysApi.GetCapacityList) // 获取capacity表列表
	}
}
